package com.kt.mes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.kt.mes.mapper.WorkPlanItemMapper;
import com.kt.mes.domain.WorkPlanItem;
import com.kt.mes.service.IWorkPlanItemService;

/**
 * 工作计划项目Service业务层处理
 * 
 * @author lzc
 * @date 2021-02-02
 */
@Service
public class WorkPlanItemServiceImpl implements IWorkPlanItemService 
{
    @Autowired
    private WorkPlanItemMapper workPlanItemMapper;

    /**
     * 查询工作计划项目
     * 
     * @param id 工作计划项目ID
     * @return 工作计划项目
     */
    @Override
    public WorkPlanItem selectWorkPlanItemById(Long id)
    {
        return workPlanItemMapper.selectWorkPlanItemById(id);
    }

    /**
     * 查询工作计划项目列表
     * 
     * @param workPlanItem 工作计划项目
     * @return 工作计划项目
     */
    @Override
    public List<WorkPlanItem> selectWorkPlanItemList(WorkPlanItem workPlanItem)
    {
        return workPlanItemMapper.selectWorkPlanItemList(workPlanItem);
    }

    /**
     * 新增工作计划项目
     * 
     * @param workPlanItem 工作计划项目
     * @return 结果
     */
    @Override
    public int insertWorkPlanItem(WorkPlanItem workPlanItem)
    {
        return workPlanItemMapper.insertWorkPlanItem(workPlanItem);
    }

    /**
     * 修改工作计划项目
     * 
     * @param workPlanItem 工作计划项目
     * @return 结果
     */
    @Override
    public int updateWorkPlanItem(WorkPlanItem workPlanItem)
    {
        return workPlanItemMapper.updateWorkPlanItem(workPlanItem);
    }

    /**
     * 批量删除工作计划项目
     * 
     * @param ids 需要删除的工作计划项目ID
     * @return 结果
     */
    @Override
    public int deleteWorkPlanItemByIds(Long[] ids)
    {
        return workPlanItemMapper.deleteWorkPlanItemByIds(ids);
    }

    /**
     * 删除工作计划项目信息
     * 
     * @param id 工作计划项目ID
     * @return 结果
     */
    @Override
    public int deleteWorkPlanItemById(Long id)
    {
        return workPlanItemMapper.deleteWorkPlanItemById(id);
    }
}
